<template>
  <div class="about-container">
    <div class="about-content">
      <div class="about-section">
        <div class="iframe-container">
          <iframe src="https://juejin.cn/" title="嵌入式示例页面" class="embedded-iframe"
            sandbox="allow-same-origin allow-scripts allow-popups allow-forms" frameborder="0"></iframe>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
import { setGlobalState } from '../global-state'

onMounted(() => {
  // 设置面包屑
  setGlobalState({
    breadcrumb: [
      { name: '首页', path: '/home' },
      { name: '关于我们' }
    ]
  })
})
</script>

<style scoped>
.about-container {
  max-width: 1000px;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.about-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.about-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.iframe-container {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: #f8f9fa;
}

.embedded-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  .about-container {
    height: 100vh;
  }

  .about-content {
    padding: 16px;
  }
}
</style>